package com.lyncs.ods.modules.company.mapper;

import com.lyncs.ods.modules.company.model.CompanyRelationRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyncs.ods.modules.company.model.CompanyRelationRoleCount;
import com.lyncs.ods.resp.CompanyGroupInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 企业关系权限信息 Mapper 接口
 * </p>
 *
 * @author alex
 * @since 2022-07-11
 */
@Mapper
public interface CompanyRelationRoleMapper extends BaseMapper<CompanyRelationRole> {

    List<CompanyRelationRoleCount> getValidRoleCount(@Param("companyId") Long companyId, @Param("relationIds") List<Long> relationIds);

    List<CompanyGroupInfo> getRelationGroupInfo(@Param("companyId") Long companyId, @Param("relationIds") List<Long> relationIds);

    List<CompanyGroupInfo> getGroupCompanyInfos(@Param("companyId") Long companyId, @Param("groupIds") List<Long> groupIds);
}
